package com.smartscreen.baseinfomanage.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartscreen.baseinfomanage.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {
    
    @Select("SELECT * FROM student WHERE class_id = #{classId}")
    List<Student> selectByClassId(String classId);
    
    // 新增：根据学号列表查询学生
    @Select("<script>" +
            "SELECT * FROM student WHERE student_number IN " +
            "<foreach collection='studentNumbers' item='number' open='(' separator=',' close=')'>" +
            "#{number}" +
            "</foreach>" +
            "</script>")
    List<Student> selectByStudentNumbers(List<String> studentNumbers);
}